import service from "@/utils/request";
import type { Response, PageResponse } from "@/types/common";
import type { OrganizationItem } from "@/types/person/organization";
export const usePersonOrganizationPageApi = (params: object) => {
  return service<any, Response<PageResponse<OrganizationItem>>>({
    url: `/v1/person/organization/page`,
    method: "GET",
    params,
  });
};

export const usePersonOrganizationQueryApi = (params: object) => {
  return service({
    url: `/v1/person/organization/query`,
    method: "GET",
    params,
  });
};

export const usePersonOrganizationListApi = () => {
  return service({
    url: `/v1/person/organization/list`,
    method: "GET",
  });
};

export const usePersonOrganizationCreateApi = (data: object) => {
  return service({
    url: `/v1/person/organization/create`,
    method: "POST",
    data,
  });
};

export const usePersonOrganizationUpdateApi = (data: object) => {
  return service({
    url: `/v1/person/organization/update`,
    method: "POST",
    data,
  });
};

export const usePersonOrganizationDeleteApi = (data: object) => {
  return service({
    url: `/v1/person/organization/delete`,
    method: "DELETE",
    data,
  });
};
